class ResponseData {

    code = null;
    message = null;
    data = null;

    constructor() {

    }

    static success(data) {
        const responseData = new ResponseData();
        responseData.code = 200;
        responseData.message = 'success';
        responseData.data = data;
        return responseData;
    }

    static error(message) {
        const responseData = new ResponseData();
        responseData.code = 500;
        responseData.message = message;
        responseData.data = null;
        return responseData;
    }
}

module.exports = ResponseData;